<?php

/**
 * Usuario form.
 *
 * @package    prode
 * @subpackage form
 * @author     Your name here
 */
class UsuarioForm extends BaseUsuarioForm
{
  public function configure()
  {
 parent::configure();
 $this->widgetSchema['file_path'] = new sfWidgetFormInputFileEditable(array(
      'label'     => 'Imagen',
      'file_src'  => '/uploads/'.$this->getObject()->getFilePath(),
      'is_image'  => true,
      //'edit_mode' => !$this->isNew(),
      //'template'  => '<div>%file%%input%%delete% %delete_label%</div>
//'
      ));
 $this->validatorSchema['file_path'] = new sfValidatorFile(array(
  'required'        => false,
  'path'            => sfConfig::get('sf_upload_dir').'/',
  'mime_categories' => 'web_images'
));
  //$this->validatorSchema['file_path'] = new sfValidatorPass();

  }
}
